home *** CD-ROM | disk | FTP | other *** search
/ CD Actual 90 / CD Actual 90.iso / Software3D / PovLab / povlab / DOS4GW.TXT < prev    next >
Encoding:
Text File  |  1999-08-29  |  21.7 KB  |  559 lines

  1. POVLAB modeler for POV-Ray 3.0.
  2. Copyright 1994,1996 Denis Olivier & ChromaGraphics.
  3. All rights reserved.
  4. -------------------------------------------------------------------------------
  5. DOS/4GW CONFIGURATION GUIDE - This file is (C) WATCOM International Corporation
  6. -------------------------------------------------------------------------------
  7.  
  8.            Postal adress   E-mail:
  9.  
  10.            DENIS OLIVIER   Internet : dolivier@cyberstation.fr
  11.       5, Bld Franck Lamy   Home pages :
  12.              17200 Royan   http://www.cyberstation.fr/~dolivier/povlab.html
  13.                   France   http://www.cyberstation.fr/~dolivier/author.html
  14.  
  15. Generalities
  16. ------------
  17. You need this file (DOS4GW.EXE) to run POVLAB. If you don't already have a
  18. copy in your path. check for it on your hard drive or download it.
  19.  
  20.  
  21. 1 Configuring DOS/4GW
  22.  
  23.  
  24.      This chapter explains how to use the DOS4G environment variable to
  25.      suppress the banner that is displayed by DOS/4GW at startup.  It also
  26.      explains how to use the DOS16M environment variable to select the switch
  27.      mode setting, if necessary, and to specify the range of extended memory in
  28.      which DOS/4GW will operate.  DOS/4GW is based on Rational Systems' DOS/16M
  29.      16-bit Protected-Mode support; hence the DOS16M environment variable name
  30.      remains unchanged.
  31.  
  32. 1.1 Suppressing the DOS/4GW Banner
  33.  
  34.      The banner that is displayed by DOS/4GW at startup can be suppressed by
  35.      issuing the following command:
  36.  
  37.        set DOS4G=quiet
  38.  
  39.      Do not insert a space between DOS4G and the equal sign.  A space to the
  40.      right of the equal sign is optional.
  41.  
  42. 1.2 Changing the Switch Mode Setting
  43.  
  44.      In almost all cases, DOS/4GW programs can detect the type of machine that
  45.      is running and automatically choose an appropriate real- to protected-mode
  46.      switch technique.  For the few cases in which this default setting does
  47.      not work we provide the DOS16M DOS environment variable, which overrides
  48.      the default setting.
  49.  
  50.      Change the switch mode settings by issuing the following command:
  51.  
  52.        set DOS16M=value
  53.  
  54.      Do not insert a space between DOS16M and the equal sign.  A space to the
  55.      right of the equal sign is optional.
  56.  
  57.      The table below lists the machines and the settings you would use with
  58.      them.  Many settings have mnemonics, listed in the column "Alternate
  59.      Name", that you can use instead of the number.  Settings that you must set
  60.      with the DOS16M variable have the notation req'd in the first column.
  61.      Settings you may use are marked option, and settings that will
  62.      automatically be set are marked auto.
  63.  
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70.  
  71.  
  72.                                            Changing the Switch Mode Setting   1 Chapter 1
  73. -------------------------------------------------------------------------------
  74.  
  75. +-------+---------------+-------+----------+-----------------------------------+
  76. |       |               |       |Alternate |                                   |
  77. |Status |Machine        |Setting|Name      |Comment                            |
  78. +-------+---------------+-------+----------+-----------------------------------+
  79. |auto   |386/486 w/ DPMI|0      |None      |Set automatically if DPMI is active|
  80. |req'd  |NEC 98-series  |1      |9801      |Must be set for NEC 98-series      |
  81. |auto   |PS/2           |2      |None      |Set automatically for PS/2         |
  82. |auto   |386/486        |3      |386, 80386|Set automatically for 386 or 486   |
  83. |auto   |386            |INBOARD|None      |386 with Intel Inboard             |
  84. |req'd  |Fujitsu FMR-70 |5      |None      |Must be set for Fujitsu FMR-70     |
  85. |auto   |386/486 w/ VCPI|11     |None      |Set automatically if VCPI detected |
  86. |req'd  |Hitachi B32    |14     |None      |Must be set for Hitachi B32        |
  87. |req'd  |OKI if800      |15     |None      |Must be set for OKI if800          |
  88. |option |IBM PS/55      |16     |None      |May be needed for some PS/55s      |
  89. +-------+---------------+-------+----------+-----------------------------------+
  90.  
  91.      The following procedure shows you how to test the switch mode setting.
  92.  
  93.        1. If you have one of the machines listed below, set the DOS16M
  94.          environment variable to the value shown for that machine and specify a
  95.          range of extended memory.  For example, if your machine is an NEC
  96.          98-series, set DOS16M=1 @2M-4M.  See the section, "Fine Control of
  97.          Memory Usage" later in this chapter for more information about setting
  98.          the memory range.
  99.  
  100.             +--------------------+---------+
  101.             | Machine            | Setting |
  102.             +--------------------+---------+
  103.             | NEC 98-series      | 1       |
  104.             | Fujitsu FMR-60,-70 | 5       |
  105.             | Hitachi B32        | 14      |
  106.             | OKI if800          | 15      |
  107.             +--------------------+---------+
  108.  
  109.          Before running DOS/4GW applications, check the switch mode setting by
  110.          following this procedure:
  111.  
  112.        2. Run PMINFO and note the switch setting reported on the last line of
  113.          the display.  (PMINFO, which reports on the protected-mode resources
  114.          available to your programs, is described in more detail in the
  115.          chapter, "Utilities".)
  116.  
  117.          If PMINFO runs, the setting is usable on your machine.
  118.  
  119.        3. If you changed the switch setting, add the new setting to your
  120.          AUTOEXEC.BAT file.
  121.  
  122.      Note:  PMINFO will run successfully on 286 machines.  If your DOS/4GW
  123.      application does not run, and PMINFO does, check the CPU type reported on
  124.      the first line of the display.
  125.  
  126. 2   Changing the Switch Mode Setting                                                             Configuring DOS/4GW
  127. -------------------------------------------------------------------------------
  128.  
  129.      You are authorized (and encouraged) to distribute PMINFO to your
  130.      customers.  You may also include a copy of this section in your
  131.      documentation.
  132.  
  133. 1.3 Fine Control of Memory Usage
  134.  
  135.      In addition to setting the switch mode as described above, the DOS16M
  136.      environment variable enables you to specify which portion of extended
  137.      memory DOS/4GW will use.  The variable also allows you to instruct DOS/4GW
  138.      to search for extra memory and use it if it is present.
  139.  
  140. 1.3.1 Specifying a Range of Extended Memory
  141.  
  142.      Normally, you don't need to specify a range of memory with the DOS16M
  143.      variable.  You must use the variable, however, in the following cases:
  144.  
  145.        * You are running on a Fujitsu FMR-series, NEC 98-series, OKI
  146.         if800-series or Hitachi B-series machine.
  147.  
  148.        * You have older programs that use extended memory but don't follow one
  149.         of the standard disciplines.
  150.  
  151.        * You want to shell out of DOS/4GW to use another program that requires
  152.         extended memory.
  153.  
  154.      If none of these conditions applies to you, you can skip this section.
  155.  
  156.      The general syntax is:
  157.  
  158.        set DOS16M= [switch_mode] [@start_address [- end_address]] [:size]
  159.  
  160.      In the syntax shown above, start_address, end_address and size represent
  161.      numbers, expressed in decimal or in hexadecimal (hex requires a 0x
  162.      prefix).  The number may end with a K to indicate an address or size in
  163.      kilobytes, or an M to indicate megabytes.  If no suffix is given, the
  164.      address or size is assumed to be in kilobytes.  If both a size and a range
  165.      are specified, the more restrictive interpretation is used.
  166.  
  167.      The most flexible strategy is to specify only a size.  However, if you are
  168.      running with other software that does not follow a convention for
  169.      indicating its use of extended memory, and these other programs start
  170.      before DOS/4GW, you will need to calculate the range of memory used by the
  171.      other programs and specify a range for DOS/4GW programs to use.
  172.  
  173.      DOS/4GW ignores specifications (or parts of specifications) that conflict
  174.      with other information about extended memory use.  Below are some examples
  175.      of memory usage control:
  176.  
  177.  
  178.  
  179.  
  180.                                                Fine Control of Memory Usage   3 Chapter 1
  181. -------------------------------------------------------------------------------
  182.  
  183.      set DOS16M= 1 @2m-4m    Mode 1, for NEC 98-series machines, and use
  184.                              extended memory between 2.0 and 4.0MB.
  185.  
  186.      set DOS16M= :1M         Use the last full megabyte of extended memory, or
  187.                              as much as available limited to 1MB.
  188.  
  189.      set DOS16M= @2m         Use any extended memory available above 2MB.
  190.  
  191.      set DOS16M= @ 0 - 5m    Use any available extended memory from 0.0 (really
  192.                              1.0) to 5.0MB.
  193.  
  194.      set DOS16M= :0          Use no extended memory.
  195.  
  196.      As a default condition DOS/4GW applications take all extended memory that
  197.      is not otherwise in use.  Multiple DOS/4GW programs that execute
  198.      simultaneously will share the reserved range of extended memory.  Any
  199.      non-DOS/4GW programs started while DOS/4GW programs are executing will
  200.      find that extended memory above the start of the DOS/4GW range is
  201.      unavailable, so they may not be able to run.  This is very safe.  There
  202.      will be a conflict only if the other program does not check the BIOS
  203.      configuration call (Interrupt 15H function 88H, get extended memory size).
  204.  
  205.      To create a private pool of extended memory for your DOS/4GW application,
  206.      use the PRIVATXM program, described in the chapter, "Utilities".
  207.  
  208.      The default memory allocation strategy is to use extended memory if
  209.      available, and overflow into DOS (low) memory.
  210.  
  211.      In a VCPI or DPMI environment, the start_address and end_address arguments
  212.      are not meaningful.  DOS/4GW memory under these protocols is not allocated
  213.      according to specific addresses because VCPI and DPMI automatically
  214.      prevent address conflicts between extended memory programs.  You can
  215.      specify a size for memory managed by VCPI or DPMI, but DOS/4GW will not
  216.      necessarily allocate this memory from the highest available extended
  217.      memory address, as it does for memory managed under other protocols.
  218.  
  219. 1.3.2 Using Extra Memory
  220.  
  221.      Some machines contain extra non-extended, non-conventional memory just
  222.      below 16MB.  When DOS/4GW runs on a Compaq 386, it automatically uses this
  223.      memory because the memory is allocated according to a certain protocol,
  224.      which DOS/4GW follows.  Other machines have no protocol for allocating
  225.      this memory.  To use the extra memory that may exist on these machines,
  226.      set DOS16M with the + option.
  227.  
  228.        set DOS16M=+
  229.  
  230.      Setting the + option causes DOS/4GW to search for memory in the range from
  231.      FA0000 to FFFFFF and determine whether the memory is usable.  DOS/4GW does
  232.      this by writing into the extra memory and reading what it has written.  In
  233.  
  234. 4   Fine Control of Memory Usage                                                             Configuring DOS/4GW
  235. -------------------------------------------------------------------------------
  236.  
  237.      some cases, this memory is mapped for DOS or BIOS usage, or for other
  238.      system uses.  If DOS/4GW finds extra memory that is mapped this way, and
  239.      is not marked read-only, it will write into that memory.  This will cause
  240.      a crash, but won't have any other effect on your system.
  241.  
  242. 1.4 Setting Runtime Options
  243.  
  244.      The DOS16M environment variable sets certain runtime options for all
  245.      DOS/4GW programs running on the same system.
  246.  
  247.      To set the environment variable, the syntax is:
  248.  
  249.        set DOS16M=[switch_mode_setting]^options.
  250.  
  251.      Note:  Some command line editing TSRs, such as CED, use the caret (^) as a
  252.      delimiter.  If you want to set DOS16M using the syntax above while one of
  253.      these TSRs is resident, modify the TSR to use a different delimiter.
  254.  
  255.      These are the options:
  256.  
  257.      0x01       check A20 line -- This option forces DOS/4GW to wait until the
  258.                 A20 line is enabled before switching to protected mode.  When
  259.                 DOS/4GW switches to real mode, this option suspends your
  260.                 program's execution until the A20 line is disabled, unless an
  261.                 XMS manager (such as HIMEM.SYS) is active.  If an XMS manager
  262.                 is running, your program's execution is suspended until the A20
  263.                 line is restored to the state it had when the CPU was last in
  264.                 real mode.  Specify this option if you have a machine that runs
  265.                 DOS/4GW but is not truly AT-compatible.  For more information
  266.                 on the A20 line, see the section, "Controlling Address Line
  267.                 A20" in this chapter.
  268.  
  269.      0x02       prevent initialization of VCPI -- By default, DOS/4GW searches
  270.                 for a VCPI server and, if one is present, forces it on.  This
  271.                 option is useful if your application does not use EMS
  272.                 explicitly, is not a resident program, and may be used with
  273.                 386-based EMS simulator software.
  274.  
  275.      0x04       directly pass down keyboard status calls -- When this option is
  276.                 set, status requests are passed down immediately and
  277.                 unconditionally.  When disabled, pass-downs are limited so the
  278.                 8042 auxiliary processor does not become overloaded by keyboard
  279.                 polling loops.
  280.  
  281.      0x10       restore only changed interrupts -- Normally, when a DOS/4GW
  282.                 program terminates, all interrupts are restored to the values
  283.                 they had at the time of program startup.  When you use this
  284.                 option, only the interrupts changed by the DOS/4GW program are
  285.                 restored.
  286.  
  287.  
  288.                                                     Setting Runtime Options   5 Chapter 1
  289. -------------------------------------------------------------------------------
  290.  
  291.      0x20       set new memory to 00 -- When DOS/4GW allocates a new segment or
  292.                 increases the size of a segment, the memory is zeroed.  This
  293.                 can help you find bugs having to do with uninitialized memory.
  294.                 You can also use it to provide a consistent working environment
  295.                 regardless of what programs were run earlier.  This option only
  296.                 affects segment allocations or expansions that are made through
  297.                 the DOS/4GW kernel (with DOS function 48H or 4AH).  This option
  298.                 does not affect memory allocated with a compiler's malloc
  299.                 function.
  300.  
  301.      0x40       set new memory to FF -- When DOS/4GW allocates a new segment or
  302.                 increases the size of a segment, the memory is set to 0xFF
  303.                 bytes.  This is helpful in making reproducible cases of bugs
  304.                 caused by using uninitialized memory.  This option only affects
  305.                 segment allocations or expansions that are made through the
  306.                 DOS/4GW kernel (with DOS function 48H or 4AH).  This option
  307.                 does not affect memory allocated with a compiler's malloc
  308.                 function.
  309.  
  310.      0x80       new selector rotation -- When DOS/4GW allocates a new selector,
  311.                 it usually looks for the first available (unused) selector in
  312.                 numerical order starting with the highest selector used when
  313.                 the program was loaded.  When this option is set, the new
  314.                 selector search begins after the last selector that was
  315.                 allocated.  This causes new selectors to rotate through the
  316.                 range.  Use this option to find references to stale selectors,
  317.                 i.e., segments that have been cancelled or freed.
  318.  
  319. 1.5 Controlling Address Line 20
  320.  
  321.      This section explains how DOS/4GW uses address line 20 (A20) and describes
  322.      the related DOS16M environment variable settings.  It is unlikely that you
  323.      will need to use these settings.
  324.  
  325.      Because the 8086 and 8088 chips have a 20-bit address spaces, their
  326.      highest addressable memory location is one byte below 1MB.  If you specify
  327.      an address at 1MB or over, which would require a twenty-first bit to set,
  328.      the address wraps back to zero.  Some parts of DOS depend on this wrap, so
  329.      on the 286 and 386, the twenty-first address bit is disabled.  To address
  330.      extended memory, DOS/4GW enables the twenty-first address bit (the A20
  331.      line).  The A20 line must be enabled for the CPU to run in protected mode,
  332.      but it may be either enabled or disabled in real mode.
  333.  
  334.      By default, when DOS/4GW returns to real mode, it disables the A20 line.
  335.      Some software depends on the line being enabled.  DOS/4GW recognizes the
  336.      most common software in this class, the XMS managers (such as HIMEM.SYS),
  337.      and enables the A20 line when it returns to real mode if an XMS manager is
  338.      present.  For other software that requires the A20 line to be enabled, use
  339.      the A20 option.  The A20 option makes DOS/4GW restore the A20 line to the
  340.  
  341.  
  342. 6   Controlling Address Line 20                                                             Configuring DOS/4GW
  343. -------------------------------------------------------------------------------
  344.  
  345.      setting it had when DOS/4GW switched to protected mode.  Set the
  346.      environment variable as follows:
  347.  
  348.        set DOS16M= A20
  349.  
  350.      To specify more than one option on the command line, separate the options
  351.      with spaces.
  352.  
  353.      The DOS16M variable also lets you to specify the length of the delay
  354.      between a DOS/4GW instruction to change the status of the A20 line and the
  355.      next DOS/4GW operation.  By default, this delay is 1 loop instruction when
  356.      DOS/4GW is running on a 386 machine.  In some cases, you may need to
  357.      specify a longer delay for a machine that will run DOS/4GW but is not
  358.      truly AT-compatible.  To change the delay, set DOS16M to the desired
  359.      number of loop instructions, preceded by a comma:
  360.  
  361.        set DOS16M=,loops
  362.  
  363.  
  364.  
  365.  
  366.  
  367.  
  368.  
  369.  
  370.  
  371.  
  372.  
  373.  
  374.  
  375.  
  376.  
  377.  
  378.  
  379.  
  380.  
  381.  
  382.  
  383.  
  384.  
  385.  
  386.  
  387.  
  388.  
  389.  
  390.  
  391.  
  392.  
  393.  
  394.  
  395.  
  396.                                                 Controlling Address Line 20   7 Chapter 1
  397. -------------------------------------------------------------------------------
  398.  
  399.  
  400.  
  401.  
  402.  
  403.  
  404.  
  405.  
  406.  
  407.  
  408.  
  409.  
  410.  
  411.  
  412.  
  413.  
  414.  
  415.  
  416.  
  417.  
  418.  
  419.  
  420.  
  421.  
  422.  
  423.  
  424.  
  425.  
  426.  
  427.  
  428.  
  429.  
  430.  
  431.  
  432.  
  433.  
  434.  
  435.  
  436.  
  437.  
  438.  
  439.  
  440.  
  441.  
  442.  
  443.  
  444.  
  445.  
  446.  
  447.  
  448.  
  449.  
  450. 8   Controlling Address Line 20
  451.  
  452.  
  453. 2 VMM
  454.  
  455.  
  456.      The Virtual Memory Manager (VMM) uses a swap file on disk to augment RAM.
  457.      With VMM you can use more memory than your machine actually has.  When RAM
  458.      is not sufficient, part of your program is swapped out to the disk file
  459.      until it is needed again.  The combination of the swap file and available
  460.      RAM is the virtual memory.
  461.  
  462.      Your program can use VMM if you set the DOS environment variable, DOS4GVM,
  463.      as follows.  To set the DOS4GVM environment variable, use the format shown
  464.      below.
  465.  
  466.        set DOS4GVM= [option[#value]] [option[#value]]
  467.  
  468.      A "#" is used with options that take values since the DOS command shell
  469.      will not accept "=".
  470.  
  471.      If you set DOS4GVM equal to 1, the default parameters are used for all
  472.      options.
  473.  
  474.      Example:
  475.        C>set DOS4GVM=1
  476.  
  477. 2.1 VMM Default Parameters
  478.  
  479.      VMM parameters control the options listed below.
  480.  
  481.      MINMEM      The minimum amount of RAM managed by VMM.  The default is
  482.                  512KB.
  483.  
  484.      MAXMEM      The maximum amount of RAM managed by VMM.  The default is 4MB.
  485.  
  486.      SWAPMIN     The minimum or initial size of the swap file.  If this option
  487.                  is not used, the size of the swap file is based on VIRTUALSIZE
  488.                  (see below).
  489.  
  490.      SWAPINC     The size by which the swap file grows.
  491.  
  492.      SWAPNAME    The swap file name.  The default name is "DOS4GVM.SWP".  By
  493.                  default the file is in the root directory of the current
  494.                  drive.  Specify the complete path name if you want to keep the
  495.                  swap file somewhere else.
  496.  
  497.      DELETESWAP  Whether the swap file is deleted when your program exits.  By
  498.                  default the file is not deleted.  Program startup is quicker
  499.                  if the file is not deleted.
  500.  
  501.      VIRTUALSIZE The size of the virtual memory space.  The default is 16MB.
  502.  
  503.  
  504.                                                      VMM Default Parameters   9 Chapter 2
  505. -------------------------------------------------------------------------------
  506.  
  507. 2.2 Changing the Defaults
  508.  
  509.      You can change the defaults in two ways.
  510.  
  511.        1. Specify different parameter values as arguments to the DOS4GVM
  512.          environment variable, as shown in the example below.
  513.  
  514.            set DOS4GVM=deleteswap maxmem#8192
  515.  
  516.        2. Create a configuration file with the filetype extension ".VMC", and
  517.          call that as an argument to the DOS4GVM environment variable, as shown
  518.          below.
  519.  
  520.            set DOS4GVM=@NEW4G.VMC
  521.  
  522. 2.2.1 The .VMC File
  523.  
  524.      A ".VMC" file contains VMM parameters and settings as shown in the example
  525.      below.  Comments are permitted.  Comments on lines by themselves are
  526.      preceded by an exclamation point (!).  Comments that follow option
  527.      settings are preceded by white space.  Do not insert blank lines:
  528.      processing stops at the first blank line.
  529.  
  530.        !Sample .VMC file
  531.        !This file shows the default parameter values.
  532.        minmem = 512            At least 512K bytes of RAM is required.
  533.        maxmem = 4096           Uses no more than 4MB of RAM
  534.        virtualsize = 16384     Swap file plus allocated memory is 16MB
  535.        !To delete the swap file automatically when the program exits, add
  536.        !deleteswap
  537.        !To store the swap file in a directory called SWAPFILE, add
  538.        !swapname = c:\swapfile\dos4gvm.swp
  539.  
  540.  
  541.  
  542.  
  543.  
  544.  
  545.  
  546.  
  547.  
  548.  
  549.  
  550.  
  551.  
  552.  
  553.  
  554.  
  555.  
  556.  
  557.  
  558. 10  Changing the Defaults
  559.